# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import api, fields, models

class SaleSettings(models.TransientModel):
    # _name = 'sale.config.settings'
    _inherit = 'sale.config.settings'

    page_settings = fields.Boolean(u'仓库人员不可见销售订单',default=True)

    @api.multi
    def set_default_page_settings(self):
        return self.env['ir.values'].sudo().set_default(
            'sale.config.settings', 'page_settings', self.page_settings)

    @api.multi
    def get_default_page_settings(self,fields):
        page_settings = self.env['ir.values'].get_default('sale.config.settings', 'page_settings')
        return {
            'page_settings': page_settings
        }
